﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows;

namespace client.converters
{
    public class PageNameToVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var currentPage = value as string;
            var targetPage = parameter as string;
            return currentPage.Equals(targetPage) ? Visibility.Visible : Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
